<?php
ob_start();
?><?php
	include("config.php");
 require_once("auth.php"); ?>
<?php

 
 $catname=$_POST['txtCategoryName'];
 $desc=$_POST['textDescription'];

  $query =mysql_query( "INSERT INTO maincategories VALUES ('','$catname','$desc')");
  if($query)
  {
  header("location: displaycategory.php?added=added");
  }
  else
  {
  echo mysql_error();
  } 
  
?>
<?php
ob_flush();
?>